<style lang="scss">
#cmain {
    .mainContent {
        min-height: 425px;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0px 0px 15px 0px rgba(207, 207, 207, 1);
        padding-top: 10px;
        padding: 0px 30px;
        .table-title {
            height: 54px;
            line-height: 54px;
            margin-bottom: 20px;
            font-size: 16px;
            font-weight: 800;
            color: rgba(102, 102, 102, 1);
            border-bottom: 1px solid #dcdfe6;
        }
        .el-input--mini .el-input__inner {
            width: 202px;
        }
        .smok-drink  .el-input__inner {
            width: 100%;
        }
        #my-table-title {
            height: 50px;
            line-height: 50px;
            text-align: center;
            background: #eef1f6;
            font-size: 14px;
            color: #2b3245;
        }
        .MyMainTable {
            padding: 10px 0px;
            border-bottom: 1px solid #eef1f6;
            .el-col {
                text-align: center;
            }
            [class^="el-icon-"] {
                cursor: pointer;
            }
            .el-icon-plus:before {
                color: #337aba;
                font-size: 20px;
                font-weight: 800;
            }
            .el-icon-minus:before {
                color: #e51c23;
                font-size: 20px;
                font-weight: 800;
            }
            .el-form-item--mini.el-form-item {
                margin-bottom: 1px !important;
            }
            .el-form-item--mini .el-form-item__content {
                margin-left: 0px !important;
            }
            .el-input--mini .el-input__inner {
                width: 100%;
            }
        }
    }
}
</style>

<template>
    <div id="cmain" class="family-tree-mask" v-loading="loading" element-loading-text="数据加载中，请稍等......">
        <div class="mainContent">

            <el-form ref="datas" :model="datas" size="mini" label-width="200px" label-position="left">
                <!--未患癌  -->
                <div class="table-title">基本健康信息</div>
                <el-row type="flex" justify="space-around">
                    <el-col :span="12" :offset="3">
                        <el-form-item label="初次月经年龄">
                            <el-select v-model="datas.primary_age">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜12岁" value="1"></el-option>
                                <el-option label="≥12岁" value="2"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="生育情况">
                            <el-select v-model="datas.fertility_circumstance">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="已生育" value="1"></el-option>
                                <el-option label="未生育" value="2"></el-option>
                                <el-option label="不孕不育" value="3"></el-option>
                                <el-option label="选择不生育" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="初次生育年龄" v-if="datas.fertility_circumstance==1">
                            <el-select v-model="datas.first_childbearing_age">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜25岁" value="1"></el-option>
                                <el-option label="25-30岁" value="2"></el-option>
                                <el-option label="≥30岁" value="3"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="子女个数" v-if="datas.fertility_circumstance==1">
                            <el-select v-model="datas.children_number">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="1个" value="1"></el-option>
                                <el-option label="2个" value="2"></el-option>
                                <el-option label="3个" value="3"></el-option>
                                <el-option label="＞3个" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="是否母乳喂养" v-if="datas.fertility_circumstance==1">
                            <el-radio-group v-model="datas.breast_feeding">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="哺乳时间" v-if="datas.breast_feeding==1">
                            <el-select v-model="datas.nursing_time">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜半年" value="1"></el-option>
                                <el-option label="＜1年" value="2"></el-option>
                                <el-option label="≥1年" value="3"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="服用口服避孕药">
                            <el-radio-group v-model="datas.oral_contraceptive">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="连续服用时间" v-if="datas.oral_contraceptive==1">
                            <el-select v-model="datas.oral_contraceptive_time" placeholder="请选择服用时间">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜6个月" value="1"></el-option>
                                <el-option label="＞6个月" value="2"></el-option>
                                <el-option label="3-5年" value="3"></el-option>
                                <el-option label="＞5年" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="是否绝经">
                            <el-radio-group v-model="datas.menopause">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="绝经年龄" v-if="datas.menopause==1">
                            <el-select v-model="datas.menopause_age">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜55岁" value="2"></el-option>
                                <el-option label="≥55岁" value="1"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="致密型乳房">
                            <el-radio-group v-model="datas.compact_breast">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="乳房活检">
                            <el-radio-group v-model="datas.breast_biopsy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="活检次数" v-if="datas.breast_biopsy==1">
                            <el-input v-model="datas.breast_biopsy_number"></el-input>
                        </el-form-item>
                        <el-form-item label="是否检测到非典型性增生">
                            <el-radio-group v-model="datas.hyperplsie_typique">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="检测到非典型性增生次数" v-if="datas.hyperplsie_typique==1">
                            <el-input v-model="datas.hyperplsie_typique_number"></el-input>
                        </el-form-item>
                        <el-form-item label="是否进行过放疗">
                            <el-radio-group v-model="datas.radiotherapy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否进行过胸壁放射治疗">
                            <el-radio-group v-model="datas.chest_radiotherapy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否接受过盆腔放射治疗">
                            <el-radio-group v-model="datas.pelvic">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否接受过内分泌治疗">
                            <el-radio-group v-model="datas.endocrinotherapy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否接受过他莫昔芬治疗">
                            <el-radio-group v-model="datas.tamoxifen_treatment">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否接受过激素替代治疗（联合雌激素和孕酮）">
                            <el-radio-group v-model="datas.hrt">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否接受过激素替代治疗（孕激素）">
                            <el-radio-group v-model="datas.hrt_lutin">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="骨囊肿">
                            <el-radio-group v-model="datas.noBC">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="是否患有高血压">
                            <el-radio-group v-model="datas.hypertension">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否患有炎性肠炎">
                            <el-radio-group v-model="datas.inflammatory_enteritis">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否超过一年服用二甲双胍">
                            <el-radio-group v-model="datas.metformin">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否服用过阿司匹林">
                            <el-radio-group v-model="datas.aspirin">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否服用过非固醇类抗炎药预防">
                            <el-radio-group v-model="datas.non_steroidal">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否具有维生素D缺乏">
                            <el-radio-group v-model="datas.vitamin_d">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否有亚急性甲状腺炎">
                            <el-radio-group v-model="datas.noST">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否有慢性淋巴细胞性甲状腺炎">
                            <el-radio-group v-model="datas.noCLT">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否有纤维性甲状腺炎">
                            <el-radio-group v-model="datas.noFt">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否有甲状腺功能亢进">
                            <el-radio-group v-model="datas.noHyper">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否有先天性巨结肠">
                            <el-radio-group v-model="datas.noMa">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否有皮肤苔藓淀粉样病变">
                            <el-radio-group v-model="datas.noCMAL">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否有多发性粘膜神经瘤">
                            <el-radio-group v-model="datas.noMMN">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否有马凡样体形">
                            <el-radio-group v-model="datas.noMs">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否有颈部淋巴结肿大">
                            <el-radio-group v-model="datas.noCLN">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否进行过预防性乳腺切除术（单侧或双侧）">
                            <el-radio-group v-model="datas.breast_adenoma">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="手术年龄" v-if="datas.breast_adenoma==1">
                            <el-input v-model="datas.breast_adenoma_age"></el-input>
                        </el-form-item>
                        <el-form-item label="是否进行过预防性双侧输卵管卵巢切除">
                            <el-radio-group v-model="datas.ovariectomy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="手术年龄" v-if="datas.ovariectomy==1">
                            <el-input v-model="datas.ovariectomy_age"></el-input>
                        </el-form-item>
                        <el-form-item label="是否患有Ⅱ型糖尿病">
                            <el-radio-group v-model="datas.niddm">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="治疗手段">
                            <el-select v-model="datas.treat_way">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="胰岛素治疗" value="1"></el-option>
                                <el-option label="非胰岛素治疗" value="2"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="是否患有多囊卵巢综合征">
                            <el-radio-group v-model="datas.pcos">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否患有子宫内膜增生">
                            <el-radio-group v-model="datas.hyperplasia_endometrii">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="是否进行过预防性子宫切除术（双侧输卵管卵巢切除）">
                            <el-radio-group v-model="datas.hysterectomy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="手术年龄" v-if="datas.hysterectomy==1">
                            <el-input v-model="datas.hysterectomy_age"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!-- 遗传综合征表型信息 -->
                <div class="table-title">遗传综合征表型信息</div>
                <el-row type="flex" justify="space-around">
                    <el-col :span="12" :offset="3">
                        <el-form-item label="胃肠道息肉">
                            <el-select v-model="datas.gi_polyps">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="腺瘤性息肉" value="1"></el-option>
                                <el-option label="锯齿状息肉" value="2"></el-option>
                                <el-option label="幼年性息肉" value="3"></el-option>
                                <el-option label="黑斑性息肉" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="息肉大小" v-if="datas.gi_polyps==2">
                            <el-select v-model="datas.sawtooth_size">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="直径＞1cm" value="1"></el-option>
                                <el-option label="直径≤1cm" value="2"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="幼年性息肉病家族史" v-if="datas.gi_polyps==3">
                            <el-radio-group v-model="datas.juvenile_polyp_history">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="皮肤黏膜色素沉着过度" v-if="datas.gi_polyps==4">
                            <el-radio-group v-model="datas.hyperpigmentation">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="黑斑性息肉病家族史" v-if="datas.gi_polyps==4">
                            <el-radio-group v-model="datas.blackspot_family_history">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="诊断年龄">
                            <el-select v-model="datas.checkAge">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜40岁" value="1"></el-option>
                                <el-option label="≤50岁" value="2"></el-option>
                                <el-option label="＞50岁" value="3"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="息肉个数">
                            <el-input v-model="datas.number"></el-input>
                        </el-form-item>
                        <el-form-item label="息肉位置">
                            <el-select v-model="datas.location">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="靠近乙状结肠" value="1"></el-option>
                                <el-option label="直肠" value="2"></el-option>
                                <el-option label="结肠" value="3"></el-option>
                                <el-option label="胃部" value="4"></el-option>
                                <el-option label="整个胃肠道" value="5"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="患有咖啡斑">
                            <el-radio-group v-model="datas.coffee_spot">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.coffee_spot==1">
                            <el-input v-model="datas.coffee_spot_number"></el-input>
                        </el-form-item>
                        <el-form-item label="患有神经纤维瘤">
                            <el-radio-group v-model="datas.neurofibroma">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.neurofibroma==1">
                            <el-input v-model="datas.neurofibroma_num"></el-input>
                        </el-form-item>
                        <el-form-item label="患有丛状神经纤维瘤">
                            <el-radio-group v-model="datas.plexiform_neurofibromas">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.plexiform_neurofibromas==1">
                            <el-input v-model="datas.pnn"></el-input>
                        </el-form-item>
                        <el-form-item label="蝶骨、胫骨发育不良">
                            <el-radio-group v-model="datas.dysontogenesis">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="脊柱侧弯">
                            <el-radio-group v-model="datas.scoliosis">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="多发性腋窝或肱股沟雀斑样色素沉着">
                            <el-radio-group v-model="datas.freckle_pigmentation">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="患有Lisch结节">
                            <el-radio-group v-model="datas.lish">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.lish==1">
                            <el-input v-model="datas.lish_number"></el-input>
                        </el-form-item>
                        <el-form-item label="成人 Lhermitte– Duclos病史">
                            <el-radio-group v-model="datas.lhermitte_duclos">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="胃肠道错构瘤／神经节瘤">
                            <el-radio-group v-model="datas.hamartoma">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.hamartoma==1">
                            <el-input v-model="datas.hamartoma_num"></el-input>
                        </el-form-item>
                        <el-form-item label="大头畸形（头围）">
                            <el-select v-model="datas.macrocephalia">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜58cm" value="1"></el-option>
                                <el-option label="58cm-60cm" value="2"></el-option>
                                <el-option label="＞60cm" value="3"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="皮肤黏膜病变">
                            <el-row type="flex" align="middle">
                                <el-col :span="8">
                                    <el-checkbox v-model="datas.trichilemoma">毛鞘瘤</el-checkbox>
                                </el-col>
                                <el-col :span="12">
                                    <el-radio-group v-if="datas.trichilemoma==true" v-model="datas.trichilemoma_num">
                                        <el-radio label="1">＜3个</el-radio>
                                        <el-radio label="2">≥3个</el-radio>
                                    </el-radio-group>
                                </el-col>
                            </el-row>
                            <el-row type="flex" align="middle">
                                <el-col :span="8">
                                    <el-checkbox v-model="datas.acrokeratoderma">肢端角化</el-checkbox>
                                </el-col>
                                <el-col :span="12">
                                    <el-radio-group v-if="datas.acrokeratoderma==true" v-model="datas.acrokeratoderma_num">
                                        <el-radio label="1">＜3个</el-radio>
                                        <el-radio label="2">≥3个</el-radio>
                                    </el-radio-group>
                                </el-col>
                            </el-row>
                            <el-row type="flex" align="middle">
                                <el-col :span="8">
                                    <el-checkbox v-model="datas.mucocutaneous_lesion">皮肤黏膜神经瘤</el-checkbox>
                                </el-col>
                                <el-col :span="12">
                                    <el-radio-group v-if="datas.mucocutaneous_lesion==true" v-model="datas.mnn">
                                        <el-radio label="1">＜3个</el-radio>
                                        <el-radio label="2">≥3个</el-radio>
                                    </el-radio-group>
                                </el-col>
                            </el-row>
                            <el-row type="flex" align="middle">
                                <el-col :span="8">
                                    <el-checkbox v-model="datas.oral_papilloma">口腔乳头瘤</el-checkbox>
                                </el-col>
                                <el-col :span="12">
                                    <el-radio-group v-if="datas.oral_papilloma==true" v-model="datas.oral_papilloma_num">
                                        <el-radio label="1">＜3个</el-radio>
                                        <el-radio label="2">≥3个</el-radio>
                                    </el-radio-group>
                                </el-col>
                            </el-row>
                        </el-form-item>
                        <el-form-item label="错构瘤性直肠息肉">
                            <el-radio-group v-model="datas.noPreP">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="“斑驳状”皮肤改变">
                            <el-radio-group v-model="datas.noMSC">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="多发性肾囊肿">
                            <el-radio-group v-model="datas.noMRC">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="非肾脏错构瘤">
                            <el-radio-group v-model="datas.noNRHo">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="脑白质辐射状移行线">
                            <el-radio-group v-model="datas.noWMB">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="确诊患成年早老综合征">
                            <el-radio-group v-model="datas.noOAS">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="儿童时期确诊为Bloom综合征">
                            <el-radio-group v-model="datas.bloom">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="自闭症谱系障碍">
                            <el-radio-group v-model="datas.asd">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="食道糖原棘皮症">
                            <el-radio-group v-model="datas.glycogen_spines">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.glycogen_spines==1">
                            <el-input v-model="datas.glycogen_spines_num"></el-input>
                        </el-form-item>
                        <el-form-item label="患有脂肪瘤">
                            <el-radio-group v-model="datas.lipomyoma">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.lipomyoma==1">
                            <el-input v-model="datas.lipomyoma_number"></el-input>
                        </el-form-item>
                        <el-form-item label="智力损伤（IQ≤75）">
                            <el-radio-group v-model="datas.intellectual_damage">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="生殖器异常">
                            <el-checkbox-group v-model="datas.genital_anomaly">
                                <el-checkbox label="1">阴茎斑点状色素沉着</el-checkbox>
                                <el-checkbox label="2">睾丸脂肪增多</el-checkbox>
                            </el-checkbox-group>
                        </el-form-item>
                        <el-form-item label="血管异常（包括多发颅内静脉发育异常）">
                            <el-radio-group v-model="datas.vascular_anomaly">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="多发性甲状腺结节">
                            <el-radio-group v-model="datas.multiple_nodi_goitre">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="患多发性或双侧性先天性视网膜色素上皮肥大">
                            <el-radio-group v-model="datas.noRetina">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="原发性色素性结节状肾上腺皮质病">
                            <el-radio-group v-model="datas.adrenal_cortical_disease">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="皮肤色素沉着：嘴唇、眼结膜、内外锥体、阴道或阴茎黏膜">
                            <el-radio-group v-model="datas.noSkin">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="肢端肥大症">
                            <el-radio-group v-model="datas.noAcr">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="蓝痣（多发）">
                            <el-radio-group v-model="datas.noBN">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="患有前额斑块">
                            <el-radio-group v-model="datas.noForehead">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="色素脱失斑">
                            <el-radio-group v-model="datas.pigmentation">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.pigmentation==1">
                            <el-input v-model="datas.pigmentation_num"></el-input>
                        </el-form-item>
                        <el-form-item label="鲛鱼皮斑">
                            <el-radio-group v-model="datas.noShagreen">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="脑皮质结节">
                            <el-radio-group v-model="datas.noCorT">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="室管膜下结节">
                            <el-radio-group v-model="datas.noSub">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="牙釉质凹陷">
                            <el-radio-group v-model="datas.noEnamel">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="视网膜色素缺失斑">
                            <el-radio-group v-model="datas.noPD">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="Birt–Hogg– Dubé相关的面部／躯干丘疹">
                            <el-radio-group v-model="datas.trunk_pimples">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.trunk_pimples==1">
                            <el-input v-model="datas.trunk_pimples_num"></el-input>
                        </el-form-item>
                        <el-form-item label="自发性气胸伴双侧肺囊肿">
                            <el-radio-group v-model="datas.bpc">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="儿童时期确诊为小脑共济失调">
                            <el-radio-group v-model="datas.cerebellar_ataxia">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!-- 基因检测信息 -->
                <div class="table-title">基因检测信息</div>
                <div id="my-table-title">
                    <el-row display="flex" align="middle" justify="space-between">
                        <el-col span="3">操作</el-col>
                        <el-col span="4">基因</el-col>
                        <el-col span="4">转录本号</el-col>
                        <el-col span="4">变异位点</el-col>
                        <el-col span="3">检测类型</el-col>
                        <el-col span="3">功能改变</el-col>
                        <el-col span="3">突变类型</el-col>
                    </el-row>
                </div>

                <div class="MyMainTable" v-for="(item,index) in datas.results" :key="item.id">
                    <el-row>
                        <el-col span="3">
                            <i class="el-icon-plus" @click="addGenejcInfo(index)"></i>
                            <i class="el-icon-minus" @click="deleteGenejcInfo(index)"></i>
                        </el-col>
                        <el-col span="4">
                            <el-form-item label-width="0">
                                <el-input v-model="item.detection_result_gene" placeholder="只能输入大写字母和数字"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col span="4">
                            <el-form-item label-width="0">
                                <el-input v-model="item.detection_result_trans" placeholder="请输入转录本号"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col span="4">
                            <el-form-item label-width="0">
                                <el-input v-model="item.detection_result_varia" placeholder="请输入变异位点"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col span="3">
                            <el-form-item label-width="0">
                                <el-select v-model="item.assay_type">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option label="全基因组" value="1"></el-option>
                                    <el-option label="全外显子检测" value="2"></el-option>
                                    <el-option label="panel检测" value="3"></el-option>
                                    <el-option label="sanger测序" value="4"></el-option>
                                    <el-option label="MLPA" value="5"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col span="3">
                            <el-form-item label-width="0" v-show="item.functional_change != 6">
                                <el-select v-model="item.functional_change">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option label="错义突变" value="1"></el-option>
                                    <el-option label="无义突变" value="2"></el-option>
                                    <el-option label="移码突变" value="3"></el-option>
                                    <el-option label="同义突变" value="4"></el-option>
                                    <el-option label="剪接位点突变" value="5"></el-option>
                                    <el-option label="其他" value="6"></el-option>
                                </el-select>
                            </el-form-item>
                            <el-form-item v-if="item.functional_change==6" label-width="0">
                                <el-input v-model="item.other_function_change"></el-input>
                                <i class="el-icon-error" @click="shouFunctionalChange(index)"></i>
                            </el-form-item>
                        </el-col>
                        <el-col span="3">
                            <el-form-item label-width="0">
                                <el-select v-model="item.mutation_type">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option label="致病的" value="1"></el-option>
                                    <el-option label="可能致病的" value="2"></el-option>
                                    <el-option label="意义不明确的" value="3"></el-option>
                                    <el-option label="可能良性的" value="4"></el-option>
                                    <el-option label="良性的" value="5"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </div>
                <!-- 生活方式 -->
                <div class="table-title">生活方式</div>
                <el-row type="flex" justify="space-around">
                    <el-col :span="12" :offset="3">
                        <el-form-item label="吸烟">
                            <el-radio-group v-model="datas.smoking">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="吸烟频率" v-if="datas.smoking==1">
                            <el-row type="flex">
                                <el-col span="6">
                                    <el-input v-model="datas.smoking_cycle" style="width:50px;" class="smok-drink">
                                        <!-- <template slot="append"></template> -->
                                    </el-input>
                                    包/周&nbsp;&nbsp;X
                                </el-col>
                                <el-col span="12">
                                    <el-input v-model="datas.smoking_year" style="width:50px;" class="smok-drink">
                                        <!-- <template slot="append">年</template> -->
                                    </el-input>
                                     年
                                </el-col>
                            </el-row>
                        </el-form-item>
                        <el-form-item label="饮酒">
                            <el-radio-group v-model="datas.drink">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="饮酒频率" v-if="datas.drink==1">
                            <el-row type="flex">
                                <el-col span="12">
                                    <el-input v-model="datas.drink_cycle" style="width:50px;" class="smok-drink">
                                        <!-- <template slot="append">次/周</template> -->
                                    </el-input>
                                    次/周
                                </el-col>
                            </el-row>
                        </el-form-item>
                        <el-form-item label="高脂高红肉类饮食">
                            <el-radio-group v-model="datas.fatty_meat">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="每日蔬菜摄入量">
                            <el-select v-model="datas.vegetable_consum">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="≥500mg" value="1"></el-option>
                                <el-option label="＜500mg" value="2"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="每日运动消耗量">
                            <el-select v-model="datas.dec">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="基本无运动量" value="1"></el-option>
                                <el-option label="30-50大卡" value="2"></el-option>
                                <el-option label="50-100大卡" value="3"></el-option>
                                <el-option label="100-200大卡" value="4"></el-option>
                                <el-option label="200-300大卡" value="5"></el-option>
                                <el-option label="＞300大卡" value="6"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="体重(kg)">
                            <el-input v-model="datas.weight" @change="getBmi"></el-input>
                        </el-form-item>
                        <el-form-item label="身高(cm)">
                            <el-input v-model="datas.height" @change="getBmi"></el-input>
                        </el-form-item>
                        <el-form-item label="BMI">
                            <div>{{ datas.bmi }}</div>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-card class="box-card footer-card">
                    <div slot="header" class="clearfix">
                        <Button style="float: right; margin-left:20px;">取消</Button>
                        <Button type="primary" style="float: right;" @click="onSave">保存</Button>
                    </div>
                </el-card>
            </el-form>
        </div>
    </div>
</template>
<script>
import { familyTree } from "api/index.js";
import { setCookie, getCookie, delCookie } from "@/common/js/cookie.js";
export default {
    name: "datas", //健康
    data() {
        return {
            loading: false,
            familyTreeId: "",
            familyUserId: "",
            datas: {
                menopause: "2", //是否绝经
                menopause_age: "", //绝经年龄
                primary_age: "", //初次月经年龄
                fertility_circumstance: "", //生育情况
                first_childbearing_age: "", //初次生育年龄
                children_number: "", //子女个数
                breast_feeding: "2", //是否母乳
                nursing_time: "", //哺乳时间
                oral_contraceptive: "2", //口服避孕药
                oral_contraceptive_time: "", //服用时间
                compact_breast: "2", //致密型乳房
                breast_biopsy: "2", //乳房活检
                breast_biopsy_number: "", //乳房活检次数
                hyperplsie_typique: "2", //非典型增生
                hyperplsie_typique_number: "", //非典型增生次数
                endocrinotherapy: "2", //内分泌治疗
                radiotherapy: "2", //放疗
                chest_radiotherapy: "2", //胸壁放射治疗
                tamoxifen_treatment: "2", //他莫昔芬治疗
                hrt: "2", //激素替代治疗（联合雌激素和孕酮）
                hrt_lutin: "2", //激素替代治疗（孕激素）
                scoliosis: "2", //脊柱侧弯
                freckle_pigmentation: "2", //多发性腋窝或肱股沟雀斑样色素沉着
                lhermitte_duclos: "2", //成人 Lhermitte– Duclos病史
                blackspot_family_history: "2", //黑斑性息肉病家族史
                glycogen_spines: "2", //食道糖原棘皮症
                glycogen_spines_num: "", //食道糖原棘皮症个数
                asd: "2", //自闭症谱系障碍
                intellectual_damage: "2", //智力损伤
                neurofibroma: "2", //患有神经纤维瘤
                neurofibroma_num: "", //患有神经纤维瘤个数
                plexiform_neurofibromas: "2", //患有丛状神经纤维瘤
                pnn: "", //患有丛状神经纤维瘤个数
                trichilemoma: "false", //毛鞘瘤
                trichilemoma_num: "",
                acrokeratoderma: "false", //肢端角化
                acrokeratoderma_num: "",
                mucocutaneous_lesion: "false", //皮肤黏膜神经瘤
                mnn: "",
                oral_papilloma: "false", //口腔乳头瘤
                oral_papilloma_num: "",
                cerebellar_ataxia: "2", //儿童时期确诊为小脑共济失调
                bloom: "2", //儿童时期确诊为Bloom综合征
                multiple_nodi_goitre: "2", //多发性甲状腺结节
                dysontogenesis: "2", //蝶骨、胫骨发育不良
                vascular_anomaly: "2", //血管异常（包括多发颅内静脉发育异常）
                hyperpigmentation: "2", //皮肤黏膜色素沉着过度
                hamartoma: "2", //胃肠道错构瘤／神经节瘤
                hamartoma_num: "",
                coffee_spot: "2", //患有咖啡斑
                coffee_spot_num: "",
                lish: "2", //患有Lisch结节
                lish_number: "",
                macrocephalia: "", //大头畸形（头围）
                lipomyoma: "2", //患有脂肪瘤
                lipomyoma_number: "",
                genital_anomaly: [], //生殖器异常
                pcos: "2", //多囊卵巢综合征
                pelvic: "2", //盆腔放射治疗
                noBC: "2", //骨囊肿
                hypertension: "2", //高血压
                inflammatory_enteritis: "2", //炎性肠炎
                metformin: "2", //是否超过一年服用二甲双胍
                aspirin: "2", //是否服用过阿司匹林
                non_steroidal: "2", //是否服用过非固醇类抗炎药预防
                vitamin_d: "2", //是否具有维生素D缺乏
                noST: "2", //是否有亚急性甲状腺炎
                noCLT: "2", //是否有慢性淋巴细胞性甲状腺炎
                noFt: "2", //是否有纤维性甲状腺炎
                noHyper: "2", //是否有甲状腺功能亢进
                noMa: "2", //是否有先天性巨结肠
                noCMAL: "2", //是否有皮肤苔藓淀粉样病变
                noMMN: "2", //是否有多发性粘膜神经瘤
                noMs: "2", //是否有马凡样体形
                noCLN: "2", //是否有颈部淋巴结肿大
                breast_adenoma: "2", //预防性乳腺切除术（单侧或双侧）
                breast_adenoma_age: "",
                ovariectomy: "2", //预防性双侧输卵管卵巢切除
                ovariectomy_age: "",
                niddm: "2", //是否患有Ⅱ型糖尿病
                treat_way: "", //糖尿病治疗手段
                hyperplasia_endometrii: "2", //子宫内膜增生
                hysterectomy: "2", //预防性子宫切除术（双侧输卵管卵巢切除）
                hysterectomy_age: "",
                gi_polyps: "", //胃肠道息肉
                sawtooth_size: "", //息肉大小
                juvenile_polyp_history: "2", //幼年性息肉病家族史
                checkAge: "", //诊断年龄
                number: "", //息肉个数
                location: "", //息肉位置
                noPreP: "2", //错构瘤性直肠息肉
                noMSC: "2", //“斑驳状”皮肤改变
                noMRC: "2", //多发性囊肿
                noNRHo: "2", //非肾脏错构瘤
                noWMB: "2", //脑白质辐射状移行线
                noOAS: "2", //确诊患成年早老综合征
                noRetina: "2", //患多发性或双侧性先天性视网膜色素上皮肥大
                adrenal_cortical_disease: "2", //原发性色素性结节状肾上腺皮质病
                noSkin: "2", //皮肤色素沉着：嘴唇、眼结膜、内外锥体、阴道或阴茎黏膜
                noAcr: "2", //肢端肥大症
                noBN: "2", //蓝痣（多发）
                noForehead: "2", //患有前额斑块
                pigmentation: "2", //色素脱失斑
                pigmentation_num: "",
                noShagreen: "2", //鲛鱼皮斑
                noCorT: "2", //脑皮质结节
                noSub: "2", //室管膜下结节
                noEnamel: "2", //牙釉质凹陷
                noPD: "2", //视网膜色素缺失斑
                trunk_pimples: "2", //Birt–Hogg– Dubé相关的面部／躯干丘疹
                trunk_pimples_num: "",
                bpc: "2", //自发性气胸伴双侧肺囊肿

                results: [
                    {
                        detection_result_gene: "", //基因
                        detection_result_trans: "", //转录本号
                        detection_result_varia: "", //变异位点
                        assay_type: "", //检测类型
                        functional_change: "", //功能改变
                        other_function_change: "", //其他
                        mutation_type: "" //突变类型
                    }
                ],
                smoking: "2", //吸烟
                smoking_cycle: "", //吸烟频率
                smoke_year: "", //吸烟年限
                drink: "2", //饮酒
                drink_cycle: "", //饮酒频率
                fatty_meat: "2", //高脂高红肉类饮食
                vegetable_consum: "", //每日蔬菜摄入量
                dec: "", //每日运动消耗量
                weight: "", //体重
                height: "", //身高
                bmi: "" //BNI
            }
        };
    },
    components: {},
    created() {
        document.title = "基本健康信息";
        this.familyTreeId = M.url().familyTreeId;
        this.familyUserId = M.url().current_personid;
        this.getHealthData();
    },
    watch: {
        datas: {
            handler: function(newVal) {
                // 生育年龄与子女个数清空
                if (newVal.fertility_circumstance != 1) {
                    this.datas.first_childbearing_age = "";
                    this.datas.children_number = "";
                    this.datas.breast_feeding = "";
                    this.datas.nursing_time = "";
                }
                // 哺乳时间清空
                if (newVal.breast_feeding != 1) {
                    this.datas.nursing_time = "";
                }
                // 服用避孕药时间清空
                if (newVal.oral_contraceptive != 1) {
                    this.datas.oral_contraceptive_time = "";
                }
                // 绝经年龄清空
                if (newVal.menopause != 1) {
                    this.datas.menopause_age = "";
                }
                // 乳房活检
                if (newVal.breast_biopsy != 1) {
                    this.datas.breast_biopsy_number = "";
                }
                // 检测到非典型性增生次数
                if (newVal.hyperplsie_typique != 1) {
                    this.datas.hyperplsie_typique_number = "";
                }
                // 是否进行过预防性乳腺切除术（单侧或双侧）
                if (newVal.breast_adenoma != 1) {
                    this.datas.breast_adenoma_age = "";
                }
                // 是否进行过预防性双侧输卵管卵巢切除
                if (newVal.ovariectomy != 1) {
                    this.datas.ovariectomy_age = "";
                }
                // 是否进行过预防性子宫切除术（双侧输卵管卵巢切除）
                if (newVal.hysterectomy != 1) {
                    this.datas.hysterectomy_age = "";
                }
                // 锯齿状息肉
                if (newVal.gi_polyps != 2) {
                    this.datas.sawtooth_size = "";
                }
                // 幼年性息肉病家族史
                if (newVal.gi_polyps != 3) {
                    this.datas.juvenile_polyp_history = "";
                }
                // 皮肤黏膜色素沉着过度/黑斑性息肉病家族史
                if (newVal.gi_polyps != 4) {
                    this.datas.hyperpigmentation = "";
                    this.datas.blackspot_family_history = "";
                }
                // 患有咖啡斑
                if (newVal.coffee_spot != 1) {
                    this.datas.coffee_spot_number = "";
                }
                // 患有神经纤维瘤
                if (newVal.neurofibroma != 1) {
                    this.datas.neurofibroma_num = "";
                }
                // 患有丛状神经纤维瘤
                if (newVal.plexiform_neurofibromas != 1) {
                    this.datas.pnn = "";
                }
                // 患有Lisch结节
                if (newVal.lish != 1) {
                    this.datas.lish_number = "";
                }
                // 胃肠道错构瘤／神经节瘤
                if (newVal.hamartoma != 1) {
                    this.datas.hamartoma_num = "";
                }
                //皮肤黏膜病变
                // 毛鞘瘤
                if (newVal.trichilemoma != true) {
                    this.datas.trichilemoma_num = "";
                }
                // 肢端角化
                if (newVal.acrokeratoderma != true) {
                    this.datas.acrokeratoderma_num = "";
                }
                // 皮肤黏膜神经瘤
                if (newVal.mucocutaneous_lesion != true) {
                    this.datas.mnn = "";
                }
                // 口腔乳头瘤
                if (newVal.oral_papilloma != true) {
                    this.datas.oral_papilloma_num = "";
                }
                // 食道糖原棘皮症个数
                if (newVal.glycogen_spines != 1) {
                    this.datas.glycogen_spines_num = "";
                }
                // 患有脂肪瘤
                if (newVal.lipomyoma != 1) {
                    this.datas.lipomyoma_number = "";
                }
                // 色素脱失斑
                if (newVal.pigmentation != 1) {
                    this.datas.pigmentation_num = "";
                }
                // Birt–Hogg– Dubé相关的面部／躯干丘疹
                if (newVal.trunk_pimples != 1) {
                    this.datas.trunk_pimples_num = "";
                }
                // 吸烟
                if (newVal.smoking != 1) {
                    this.datas.smoking_cycle = "";
                    this.datas.smoking_year = "";
                }
                // 饮酒
                if (newVal.drink != 1) {
                    this.datas.cut_tuboovarian_age = "";
                }
            },
            deep: true
        }
    },
    methods: {
        onClose() {
            window.close();
        },
        onSave() {
            console.log(this.datas);
            console.log(JSON.stringify(this.datas));
            let obj = {
                userId: getCookie("userid"),
                familyTreeId: this.familyTreeId,
                familyUserId: this.familyUserId,
                familyBasic: this.datas
            };
            this.loading = true;
            familyTree
                .saveOrUpdateHealth(obj)
                .then(res => {
                    if (res.returnCode == 0 || res.returnCode == 200) {
                        this.$Message.success("保存" + res.msg);
                    } else {
                        this.$Message.error(res.msg);
                    }
                    this.loading = false;
                })
                .catch(error => {
                    this.loading = false;
                });
        },
        addGenejcInfo(index) {
            let obj = {
                detection_result_gene: "", //基因
                detection_result_trans: "", //转录本号
                detection_result_varia: "", //变异位点
                assay_type: "", //检测类型
                functional_change: "", //功能改变
                other_function_change: "", //其他
                mutation_type: "" //突变类型
            };
            ++index;
            this.datas.results.splice(index, 0, obj);
        },
        deleteGenejcInfo(index) {
            if (this.datas.results.length <= 1) {
                this.$Message.info("最少为一条，不可删除了");
                return;
            }
            this.datas.results.splice(index, 1);
        },
        shouFunctionalChange(index) {
            this.datas.results[index].functional_change = "";
            this.datas.results[index].other_function_change = "";
        },
        getBmi() {
            let bmi =
                Math.round(
                    this.datas.weight /
                        Math.pow(this.datas.height / 100, 2) *
                        100
                ) / 100;
            if (isNaN(bmi) || bmi == Infinity) {
                this.datas.bmi = "";
            } else {
                this.datas.bmi = bmi;
            }
        },
        getHealthData() {
            let obj = {
                userId: getCookie("userid"),
                familyTreeId: this.familyTreeId,
                familyUserId: this.familyUserId
            };
            this.loading = true;
            familyTree
                .findOneFromHealth(obj)
                .then(res => {
                    if (res.returnCode == 0 || res.returnCode == 200) {
                        if (res.data && res.data.familyBasic) {
                            this.datas = res.data.familyBasic;
                        }
                    } else {
                        this.$Message.error(res.msg);
                    }
                    this.loading = false;
                })
                .catch(error => {
                    this.loading = false;
                });
        }
    }
};
</script>
 